package actionPattern.observer;

public class Client {

    public static void main(String[] args) {
        Subject subject = new ConcreteSubject();
        Observer ob1 = new ConcreteObserver("小李");
        Observer ob2 = new ConcreteObserver("小王");

        subject.attach(ob1);
        subject.attach(ob2);
        subject.notifyAllOb("小林过生日了");

        subject.dettach(ob1);
        subject.notifyAllOb("小虎过生日了");
    }
}
